<script setup>
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
import { onUnmounted } from 'vue'
import { useStore } from 'vuex'

const store = useStore()

onLaunch(() => {
  console.log('App Launch')
  if (!store.state.user.token) {
    uni.navigateTo({
      url: '/pages/auth/index',
    })
  }
})
onShow(() => {
  console.log('App Show')
})  
onHide(() => {
  console.log('App Hide')
})

// onUnmounted(() => {
//   debugger;
//   sessionStorage.clear();
//   localStorage.clear();
// })
</script>

<style>
/* 小程序不支持直接加载本地字体文件 */
@import url('@/static/css/heroicons-solid.css');
@import url('@/static/css/heroicons-outline.css');

@tailwind base;
@tailwind components;
@tailwind utilities;

.status-bar {
  height: var(--status-bar-height);
}
</style>
